{extend name="property/public/insidePageBase" /}
{block name="title"}编辑设施{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-form  layui-form-pane">
            <div class="layui-form-item required">
                <label class="layui-form-label required">设施名称</label>
                <div class="layui-input-block">
                    <input type="text" name="facility_name" value="{$info['facility_name']??''}" lay-verify="require" autocomplete="off" placeholder="请输入设施名称" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label required">设施图标</label>
                <div class="layui-input-inline">
                    <input type="text" name="picture" value="{$info['picture'] ?? ''}" lay-verify="required" placeholder="请上传设施图标" id="picture" class="layui-input">
                </div>
                <img src="{$info['picture'] ?? ''}" class="checkPictureByImg picture" style="width: 80px;height: 40px;">
                <div class="layui-input-inline layui-btn-container" style="width: auto;">
                    <button type="button" class="layui-btn layui-btn-primary uploadImg" lay-data="{field: 'picture',data:{dir:'property/facilities', field:'picture'}}">
                        <i class="layui-icon">&#xe67c;</i>
                    </button>
                </div>
            </div>
            <div class="layui-form-item layui-inline" pane="">
                <label class="layui-form-label">是否显示</label>
                <div class="layui-input-inline">
                    <input type="radio" name="is_show" autocomplete="off" value="1" title="显示" {:isset($info['is_show']) ? $info['is_show'] == 1 ? 'checked' : '' : ''}>
                    <input type="radio" name="is_show" autocomplete="off" value="2" title="隐藏" {:isset($info['is_show']) ? $info['is_show'] == 2 ? 'checked' : '' : ''}>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <textarea  name="remark" placeholder="请输入备注说明"  class="layui-textarea">{$info['remark']}</textarea>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <button class="layui-btn" lay-submit lay-filter="submitBtn" id="submitBtn">提交</button>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form,layer = layui.layer,  $ = layui.$;
        $('.uploadImg').selectImages({
            confirm:function(res,elem,data) {
                $('#' + data.field).val(res[0].src);
                $('.' + data.field).attr('src',res[0].src)
            }
        });
    });
</script>
{/block}